using System;
using System.Collections.Generic;
using System.Text;
using Evolution.Engine.Managers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Evolution.Engine.Cameras;
using Evolution.Engine.Keymapping;
using Evolution.Engine.Utilities;

namespace Evolution.Engine.Objects
{
    public class HumanPlayer : Player
    {
        public HumanPlayer(string Name, string modelAsset, string shader, string defaultAnimation, Vector3 scale)
            : base(Name, modelAsset, shader, PlayerType.Human)
        {
            SetCamera("ThirdPersonCamera", CameraType.ThirdPerson);
            ((ThirdpersonCamera)CameraManager.Instance.ActiveCamera).CameraOffset = new Vector3(0, 0.25f, 1f);
            ((ThirdpersonCamera)CameraManager.Instance.ActiveCamera).LookatOffset = new Vector3(0, 0.25f, 0);
            _Model.Animation = defaultAnimation;
            SetScale(scale);
            SetPhysics(85, 200);
        }

        public void SetPhysics(float mass, float maxVelocity)
        {
            _PhysicsObject.Mass = mass;
            _MaxVelocity = maxVelocity;
        }

        public void UpdateModel(GameTime gameTime)
        {
            _Model.Update(gameTime);
        }
    }
}
